package com.wangshouyu.mp.user.tag;

import com.wangshouyu.mp.base.response.BaseResponse;

import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月23日 16:35
 * @description 标签响应
 */
public class TagResponse extends BaseResponse {

    /**
     * 标签信息
     */
    private TagInfo tag;

    public TagInfo getTag() {
        return tag;
    }

    public void setTag(TagInfo tag) {
        this.tag = tag;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        TagResponse that = (TagResponse) o;
        return Objects.equals(tag, that.tag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), tag);
    }

    public TagResponse(TagInfo tag) {
        this.tag = tag;
    }

    public TagResponse() {
    }

    @Override
    public String toString() {
        return "TagResponse{" +
                "tag=" + tag +
                '}';
    }
}
